<?php $this->load->view('Import/navbar');?>
<h4>固定传播基金专营店类</h4>
  <!-- Tab panes -->
  <div class="tab-content" style="margin-top: 10px;">
    <div role="tabpanel" class="tab-pane" id="spreadStore">
        <!-- 查询框开始 -->
        <div class="table-responsive">
        <form class="form-inline" method="GET" name="query" id="query">
        <input type="hidden" name="c" id="c" value="Import">
        <input type="hidden" name="m" id="m" value="spreadStore">
          <div class="form-group">
            <label for="year">所属年份：</label>
            <select class="form-control" id="year" name="year">
              <option value="">请选择</option>
          </select>
          </div>
          <div class="form-group">
            <label for="keyword">关键字：</label>
            <input type="text" class="form-control" name="keyword" id="keyword" value="<?=$keyword?>" placeholder="关键字">
          </div>
          <div class="form-group">
            <button type="submit" class="btn btn-default btn-primary">搜索</button>
            <button type="button" style="width: 200px;" class="btn btn-default" role="button" onclick="newWindow('导入固定传播基金专营店类','<?php echo printUrl('Import','spreadStoreAdd');?>',500,400)">导入固定传播基金专营店类</button>
          </div>
        </form>
        </div>
        <!-- 查询框结束 -->
        <!-- 表格列表 -->
        <div style="margin-top: 10px;">
        <table class="table table-bordered table-condensed">
          <thead>
            <tr>
              <th class="bg-primary text-center">区域</th>
              <th class="bg-primary text-center">大区</th>
              <th class="bg-primary text-center">小区</th>
              <th class="bg-primary text-center">城市</th>
              <th class="bg-primary text-center">专营店名称</th>
              <th class="bg-primary text-center">专营店类型</th>
              <th class="bg-primary text-center">导入时间</th>
              <th class="bg-primary text-center">操作</th>
            </tr>
          </thead>
          <tbody>
            <?php foreach ($list as $k => $v) {?>
            <tr>
              <td class="text-center"><?=$v['area']?></td>
              <td class="text-center"><?=$v['region']?></td>
              <td class="text-center"><?=$v['spsarea']?></td>
              <td class="text-center"><?=$v['city']?></td>
              <td class="text-center"><?=$v['storeName']?></td>
              <td class="text-center">
              <?php
              if ($v['type'] == 1) {
                echo '申报店';
              }elseif ($v['type'] == 2) {
                echo '单独投放店';
              }elseif ($v['type'] == 3) {
                echo '协办店';
              }
              ?>
              </td>
              <td class="text-center"><?=date("Y-m-d H:i:s", $v['createTime'])?></td>
              <td class="text-center">
                <button class="btn btn-default btn-sm" type="button" onclick="ajaxConfirmSubmit('您确定删除此固定传播基金专营店类吗？','<?=printUrl('Import','spreadStoreDel');?>',{'id':<?=$v['id']?>})">删除</button>
              </td>
            </tr>
            <?php } ?>
          </tbody>
        </table>
        </div>
        <!-- 分页 -->
        <?=$pager?>
    </div>
  </div>
  <script type="text/javascript">
  $(function(){
      loadYearList('year',<?=$year ? $year : 0?>);
  });
  </script>
<?php $this->load->view('Import/foot');?>